/*
 * highScore.h
 *
 *  Created on: Apr 25, 2010
 *      Author: chincmex
 */

#ifndef HIGHSCORE_H_
#define HIGHSCORE_H_

#include "gfxFunctions.h"

using namespace std;

const int SLOTS = 7;
const int NAME_SIZE = 31;

const int X_POS_NAME = 420;
const int X_POS_SCOR = 650;
const int Y_POS = 180;

struct scoreCollection
{
	char name[NAME_SIZE];
	int  score;
};


class highScore
{
private:
	list<TextElement>	scoreTable;
	list<TextElement>	nameTable;

	pair<string, string>  *scoreArray;

	fstream 	inData;
	fstream 	outData;
	string		temp;
	string 		sNumber;
	string		newScore;

	stringstream		sScore;
	stringstream		sName;
	stringstream 		ssTemp;

	int			iScore;
	long		index;

public:
	highScore();
	highScore(const highScore &);
	~highScore();

    //void getGamertag(Timer&);
	void updateScore(int, string);
	void updateFile( );
	void readFile();
	void makeFile();
	void printScreen(SDL_Surface*& scrn);
};


#endif /* HIGHSCORE_H_ */
